<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div0 {
            width: 520px;
            background-color: blueviolet;
            /* 设置display:flex;属性，使div0成为一个flex容器,这样子div0下的div元素就不再是块级元素了，而是行内元素，会自动排列 */
            display: flex;
        }
       .div0 div {
            width: 100px;
            height: 100px;
            background-color: yellow;
       }
    </style>
</head>
<body>
    <div class="div0">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
    </div>
   
    
</body>
</html>